#pragma once

#include "../Core/IDisposable.h"
#include "BufferHint.h"

namespace Renderer
{
	class ReadPixelBuffer : public Core::IDisposable
	{
	public:

		virtual int GetSizeInBytes() const = 0;

		virtual PixelBufferHint GetUsageHint() const = 0;
	};

	template<typename T>
	class TemplateReadPixelBuffer : public ReadPixelBuffer
	{
	public:
		virtual void CopyFromSystemMemory(T* bufferInSystemMemory, int destinationOffSetInBytes, int lenghtInBytes) = 0;

		virtual T* CopyToSystemMemory()
		{
			return CopyToSystemMemory(0, SizeInBytes());
		}

		virtual T* CopyToSystemMemory(int offsetInBytes, int sizeInBytes) = 0;
	};
}